package com.ff.discounts.component.saleorder

import android.os.Bundle
import com.ff.discounts.R
import com.ff.discounts.adapter.TabLayoutViewPager2Mediator
import com.ff.discounts.component.tab.home.HistoryData
import com.ff.discounts.databinding.FragmentOrderPageBinding
import com.ff.discounts.fragment.BaseViewModelFragment

/**
 *这是商品订单管理类
 * @author: fufang
 * @date: 2023/11/2
 */
class OrderPageFragment: BaseViewModelFragment<FragmentOrderPageBinding>() {
    override fun initDatum() {
        super.initDatum()
        binding.apply {
            pager.adapter = OrderPageAdapter(requireActivity(),OrderPageFragment.HotList)
            TabLayoutViewPager2Mediator(indicator, pager ){
                indicator, pager ->
            }.attach()
        }
    }

    companion object{
        fun newInstance():OrderPageFragment{
            val args = Bundle()
            val fragment = OrderPageFragment()
            fragment.arguments = args
            return fragment
        }

        private val HotList = mutableListOf<HistoryData>(
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo,"极品校花爱上我", "第五集")
        )
    }
}